package cn.slt.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.slt.domian.MD_Metadata;
import cn.slt.mapper.MD_MetadataMapper;
import cn.slt.service.MD_MetadataService;
@Service
@Transactional
public class MD_MetadataServiceImpl implements MD_MetadataService{
	@Autowired
	private MD_MetadataMapper mapper;
	public boolean add(MD_Metadata Metadata) {
		return mapper.add(Metadata);
	}
	public boolean addBatch(List<MD_Metadata> list) {
		return mapper.addBatch(list);
	}
	public String getPKID() {
		return mapper.getPKID();
	}
	public boolean testaddBatch(List<MD_Metadata> list) {
		return mapper.testaddBatch(list);
	}
	public List<MD_Metadata> getall(String buildunit){
		return mapper.getall(buildunit);
	}
	public MD_Metadata getone(String location, String owner){
		Map<String, String> map=new HashMap<String, String>();
		map.put("location", location);
		map.put("owner", owner);
		return mapper.getone(map);
	}
	
	public List<MD_Metadata> getby3code(MD_Metadata md_Metadata) {
		// TODO Auto-generated method stub
		return mapper.getby3code(md_Metadata);
	}
	@Override
	public boolean updateMeta(MD_Metadata metadata) {
		// TODO Auto-generated method stub
		return mapper.updateMeta(metadata);
	}
	@Override
	public boolean deleteMeta(String location, String owner) {
		// TODO Auto-generated method stub
		Map<String, String> map=new HashMap<String, String>();
		map.put("location", location);
		map.put("owner", owner);
		return mapper.deleteMeta(map);
		
	}
	@Override
	public List<MD_Metadata> getEveryone() {
		// TODO Auto-generated method stub
		return mapper.getEveryone();
	}
}
